(defun num2wordlen (n)
  (cond
   ((< n 20) (case n
			   (1 3)
			   (2 3)
			   (3 5)
			   (4 4)
			   (5 4)
			   (6 3)
			   (7 5)
			   (8 5)
			   (9 4)
			   (10 3)
			   (11 6)
			   (12 6)
			   (13 8)
			   (14 8)
			   (15 7)
			   (16 7)
			   (17 9)
			   (18 8)
			   (19 8)))
   ((< n 100) (if (= 0 (mod n 10))
				  (case n
					(20 6)
					(30 6)
					(40 6)
					(50 5)
					(60 5)
					(70 7)
					(80 6)
					(90 6))
				(let* ((d1 (mod n 10))
					   (d2 (- n d1)))
				  (+ (num2wordlen d1) (num2wordlen d2)))))
   ((< n 1000) (if (= 0 (mod n 100))
				   (+ 7 (num2wordlen (/ n 100)))
				 (let* ((d1 (mod n 100))
						(d23 (- n d1)))
				   (+ (num2wordlen d1) (num2wordlen d23) 3))))
   (t 11)))

